#pragma once

#include <boost/smart_ptr.hpp>

#include <QtCore/QUrl>

#include "exports.hpp"
#include "Plugin.h"




/**
 * A UrlFilter can be installed to prevent replies from getting
 * processed by all DataProcessor.
 */
class CRAWLER_API UrlFilter : public Plugin
{
public:

	UrlFilter();
	virtual ~UrlFilter();



	/**
	 * Test if the given Url shall be fed to the Crawler or not.
	 *
	 * @param url      the Url to test
	 *
	 * @return true    when it passed the test
	 * @return false   when it didn't: it will be discarded instead
	 */
	virtual bool filterUrl(const QUrl &url) const = 0;
};
///////////////////////////////////////////////////////////////////////////////////////////////////
